#include <stdio.h>
#include "usart.h"

#define LOG_PRINT_INTER (&huart1)

#ifdef __GNUC__
int _write(int fd, char* ptr, int len)
{
    HAL_UART_Transmit(LOG_PRINT_INTER, (uint8_t*)ptr, len, 10);
    return len;
}
#endif
#ifdef __CC_ARM
int fputc(int ch, FILE *f)
{
    HAL_UART_Transmit(LOG_PRINT_INTER, (uint8_t *)&ch, 1, 10);
    return ch;
}
#endif
